import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({

    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/order',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/order.vue'),
                    meta: { title: '订单管理' }
                },
                {
                    path: '/advertisePosition',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/advertisePosition.vue'),
                    meta: { title: '广告位置' }
                },
                {
                    path: '/advertise',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/advertise.vue'),
                    meta: { title: '广告管理' }
                },
                {
                    path: '/question',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/question.vue'),
                    meta: { title: '客户问答' }
                },
                {
                    path: '/couponRecord',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/couponRecord.vue'),
                    meta: { title: '优惠券记录' }
                },
                {
                    path: '/maintainRecord',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/maintainRecord.vue'),
                    meta: { title: '维修记录' }
                }, {
                    path: '/maintainShop',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/maintainShop.vue'),
                    meta: { title: '维修厂' }
                }, {
                    path: '/coupon',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/coupon.vue'),
                    meta: { title: '会员优惠券' }
                }, {
                    path: '/carComment',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/carComment.vue'),
                    meta: { title: '车辆评论' }
                },
                {
                    path: '/carShop',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/carShop.vue'),
                    meta: { title: '代理门店' }
                },
                {
                    path: '/brand',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/brand.vue'),
                    meta: { title: '汽车品牌' }
                },
                {
                    path: '/carConfig',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/carConfig.vue'),
                    meta: { title: '车辆配置' }
                },
                {
                    path: '/carType',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/carType.vue'),
                    meta: { title: '车辆类型' }
                },
                {
                    path: '/car',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/car.vue'),
                    meta: { title: '所有车辆' }
                },
                {
                    path: '/stat1',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/stat1.vue'),
                    meta: { title: '统计图1' }
                }, {
                    path: '/stat2',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/stat2.vue'),
                    meta: { title: '用户登录统计' }
                }, 
                {
                    path: '/stat4',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/stat4.vue'),
                    meta: { title: '统计图4' }
                },
                {
                    path: '/integration',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/integration.vue'),
                    meta: { title: '会员积分' }
                },
                {
                    path: '/level',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/level.vue'),
                    meta: { title: '会员等级' }
                },
                {
                    path: '/client',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/client.vue'),
                    meta: { title: '会员管理' }
                }, {
                    path: '/operLog',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/operLog.vue'),
                    meta: { title: '日志记录' }
                }, {
                    path: '/user',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/user.vue'),
                    meta: { title: '用户管理' }
                }, {
                    path: '/role',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/role.vue'),
                    meta: { title: '角色管理' }
                }, {
                    path: '/menu',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/menu.vue'),
                    meta: { title: '菜单管理' }
                },
                {
                    path: '/dict',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dict.vue'),
                    meta: { title: '数据字典' }
                },
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '首页' }
                },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: 'Tab选项卡' }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
